/**
 * Ingenius-Group S.A.S
 *
 * Project: SAU
 * File: EditIndicatorEvent.java
 * Date: 08/02/2011
 */

package com.ingenius.sau.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.ingenius.sau.client.event.EditIndicatorEvent.EditIndicatorEventHandler;

/**
 * Class <strong>EditIndicatorEvent</strong>
 * 
 * @author Jesus David
 * @version 0.1
 */
public class EditIndicatorEvent extends GwtEvent<EditIndicatorEventHandler> {

	public interface EditIndicatorEventHandler extends EventHandler {

		void onEditIndicator(EditIndicatorEvent event);
	}

	public static Type<EditIndicatorEventHandler> TYPE = new Type<EditIndicatorEventHandler>();

	private final String indicatorId;

	public EditIndicatorEvent(String indicatorId) {
		this.indicatorId = indicatorId;
	}

	public String getIndicatorId() {
		return indicatorId;
	}

	@Override
	public Type<EditIndicatorEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EditIndicatorEventHandler handler) {
		handler.onEditIndicator(this);
	}
}
